<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=gb2312" />
		<title>Common Template Engine</title>
		<meta name="keywords" content="commontemplate ctl template language engine code generator" />
		<style type="text/css">
			body {
				margin: 0px;
				padding: 0px;
				font-family: Arial, Helvetica, sans-serif;
				font-size: 12px;
				color: #000000;
				cursor: url('../images/cursor.cur');
			}

			td {
				font-size: 12px;
				height: 26;
			}

			img {
				border: 0px;
				clear: right;
			}

			input {
				font-family: Arial, Helvetica, sans-serif;
				font-size: 12px;
				color: #000000;
			}

			a:link {
				font-size: 12px;
				color: #003399;
				text-decoration: none;
			}
			a:visited {
				font-size: 12px;
				color: #003399;
				text-decoration: none;
			}
			a:active {
				font-size: 12px;
				color: #003399;
				text-decoration: none;
			}
			a:hover {
				font-size: 12px;
				color: #003399;
				text-decoration: underline;
			}
		</style>
	</head>
	<body>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td height="66">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td rowspan="2" height="60"><a href="http://www.commontemplate.org"><img src="../images/banner.gif" alt="Common Template Engine" border="0" width="400" height="50" /></a></td>
							<td height="40" valign="top" align="right">
								
								Release
								|
								<a href="../build/en/index.html">Build</a>
								
								&gt;&gt;&nbsp;
								
								English
								
								|
								
								<a href="../zh/mvc.html">&#20013;&#25991;</a>
								
							</td>
						</tr>
						<tr>
							<td height="20" valign="bottom" align="right">
								<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-style: solid; border-color: #CCCCCC;">
									<tr align="center">
										
										<td width="90" height="20" style="font-weight: bold;"><a href="downloads.html" target="_self">Downloads</a></td>
										
										<td width="90" height="20" style="font-weight: bold;"><a href="changes.html" target="_self">Changes Log</a></td>
										
										<td width="90" height="20" style="font-weight: bold;"><a href="http://forum.commontemplate.org/index.php" target="_blank">Forums</a></td>
										
										<td width="90" height="20" style="font-weight: bold;"><a href="about.html" target="_self">About Us</a></td>
										
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td colspan="2" height="6" style="background-color: #005B88;"></td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="200" valign="top">
								<table width="100%" border="1" style="border-collapse: collapse; border-style: solid; border-color: #CCCCCC;" cellspacing="1" cellpadding="2">
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="4" height="22" style="background-color: #0055CC;"></td>
													<td width="4"></td>
													<td style="font-weight: bold;">Documents</td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="index.html" target="_self">Overview</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="template.html" target="_self">Template Reference</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="expression.html" target="_self">Expression Reference</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="coat.html" target="_self">Syntax Coat Reference</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="config.html" target="_self">Config Guide</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="extension.html" target="_self">Expansion Guide</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="api.html" target="_self">API Guide</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="faq.html" target="_self">FAQ</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="versus.html" target="_self">Versus Other Engine</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="4" height="22" style="background-color: #0055CC;"></td>
													<td width="4"></td>
													<td style="font-weight: bold;">Integration</td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="mvc.html" target="_self">MVC Integration</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="jsp.html" target="_self">JSP Integration</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="cache.html" target="_self">Cache Integration</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="logger.html" target="_self">Logger Integration</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="data.html" target="_self">Data Format</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="javaxscript.html" target="_self">Javax Script Integration</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="mail.html" target="_self">Mail Sender Integration</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="dependency.html" target="_self">Dependency Library</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="4" height="22" style="background-color: #0055CC;"></td>
													<td width="4"></td>
													<td style="font-weight: bold;">Tools</td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="debugger.html" target="_self">Debug Window</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="viewer.html" target="_self">Viewer</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="generator.html" target="_self">Template Generator</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="converter.html" target="_self">Template Converter</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="editor.html" target="_self">Editor PlugIn</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="codecase.html" target="_self">Code Case</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="4" height="22" style="background-color: #0055CC;"></td>
													<td width="4"></td>
													<td style="font-weight: bold;">Development</td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="architecture.html" target="_self">Architecture Specification</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="criterion.html" target="_self">Develop Criterion</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="planning.html" target="_self">Project Planning</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="requirement.html" target="_self">Requirement</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="4" height="22" style="background-color: #0055CC;"></td>
													<td width="4"></td>
													<td style="font-weight: bold;">Resources</td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="downloads.html" target="_self">Downloads</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="../resources/license.txt" target="_blank">License</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="changes.html" target="_self">Changes Log</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="uml.html" target="_self">UML</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="../javadoc/index.html" target="_self">Java Doc</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="../coverage/index.html" target="_self">Coverage Report</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="4" height="22" style="background-color: #0055CC;"></td>
													<td width="4"></td>
													<td style="font-weight: bold;">Community</td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="about.html" target="_self">Developer Team</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="http://forum.commontemplate.org/index.php/index.php" target="_blank">Forums</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="http://code.google.com/p/commontemplate/w/list" target="_blank">Wiki</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="http://groups.google.com/group/commontemplate-user" target="_blank">Mail List</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="http://code.google.com/p/commontemplate/issues/list" target="_blank">Bugs List</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									<tr>
										<td height="24" style="background-color: #F4F4F4;">
											<table width="100%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="16"></td>
													<td><a href="http://code.google.com/p/commontemplate/issues/entry" target="_blank">Report Bugs Here !</a></td>
												</tr>
											</table>
										</td>
									</tr>
									
									
								</table>
								<br/>
								<form method="GET" action="http://www.google.com/custom" target="_blank">
								<table border="0" cellspacing="0" cellpadding="4">
									<tr>
										<td>
											<input type="text" name="q" maxlength="128" style="width: 120px;" />
											<input type="hidden" name="domains" value="commontemplate.org" />
											<input type="hidden" name="sitesearch" value="commontemplate.org" />
											<input type="hidden" name="hl" value="en-US" />
											<input type="hidden" name="cof" value="LH:50;LW:400;L:http://www.commontemplate.org/images/banner.gif;S:http://www.commontemplate.org;" />
										</td>
										<td>
											<input type="submit" name="sa" value="Search" />
										</td>
									</tr>
								</table>
								</form>
							</td>
							<td width="20">&nbsp;</td>
							<td align="left" valign="top">
								<table width="100%" border="0" cellpadding="0" cellspacing="0">
									<tr>
										<td height="32" align="left" valign="bottom"><b><font size="3">MVC Integration Guide</font></b></td>
									<tr>
									<tr>
										<td align="left"><hr width="30%" align="left" /></td>
									<tr>
									<tr>
										<td align="left">
											

								<b>1. Tools</b> <a href="dependency.html">Dependency&gt;&gt;</a><br/>
								<b>(1) Servlet</b><br/>
								web.xml:<br/>
<font color="#3f7f5f">&lt;listener&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;listener-class&gt;</font>org.commontemplate.tools.web.EngineInitializeListener<font color="#3f7f5f">&lt;/listener-class&gt;</font><br/>
<font color="#3f7f5f">&lt;/listener&gt;</font><br/>
<br/>
<font color="#3f7f5f">&lt;filter&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;filter-name&gt;</font>encoding<font color="#3f7f5f">&lt;/filter-name&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;filter-class&gt;</font>org.commontemplate.tools.web.EncodingFilter<font color="#3f7f5f">&lt;/filter-class&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;init-param&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;param-name&gt;</font>encoding<font color="#3f7f5f">&lt;/param-name&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;param-value&gt;</font>UTF-8<font color="#3f7f5f">&lt;/param-value&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;/init-param&gt;</font><br/>
<font color="#3f7f5f">&lt;/filter&gt;</font><br/>
<font color="#3f7f5f">&lt;filter-mapping&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;filter-name&gt;</font>encoding<font color="#3f7f5f">&lt;/filter-name&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;url-pattern&gt;</font>*.action<font color="#3f7f5f">&lt;/url-pattern&gt;</font><br/>
<font color="#3f7f5f">&lt;/filter-mapping&gt;</font><br/>
<br/>
<font color="#3f7f5f">&lt;servlet&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;servlet-name&gt;</font>commontemplate<font color="#3f7f5f">&lt;/servlet-name&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;servlet-class&gt;</font>org.commontemplate.tools.web.servlet.TemplateServlet<font color="#3f7f5f">&lt;/servlet-class&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;load-on-startup&gt;</font>1<font color="#3f7f5f">&lt;/load-on-startup&gt;</font><br/>
<font color="#3f7f5f">&lt;/servlet&gt;</font><br/>
<font color="#3f7f5f">&lt;servlet-mapping&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;servlet-name&gt;</font>commontemplate<font color="#3f7f5f">&lt;/servlet-name&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;url-pattern&gt;</font>*.ctl<font color="#3f7f5f">&lt;/url-pattern&gt;</font><br/>
<font color="#3f7f5f">&lt;/servlet-mapping&gt;</font><br/>
								<br/>
								<b>(2) Struts</b><br/>
								...<br/>
								<br/>
								<b>CommonTemplate in MVC: </b><br/>
								<img src="../images/frame/mvc.gif" alt="CommonTemplate In MVC" /><br/>
								<br/>
								<b>(3) WebWork</b><br/>
								web.xml:<br/>
<font color="#3f7f5f">&lt;listener&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;listener-class&gt;</font>org.commontemplate.tools.web.EngineInitializeListener<font color="#3f7f5f">&lt;/listener-class&gt;</font><br/>
<font color="#3f7f5f">&lt;/listener&gt;</font><br/>
<br/>
<font color="#3f7f5f">&lt;filter&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;filter-name&gt;</font>encoding<font color="#3f7f5f">&lt;/filter-name&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;filter-class&gt;</font>org.commontemplate.tools.web.EncodingFilter<font color="#3f7f5f">&lt;/filter-class&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;init-param&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;param-name&gt;</font>encoding<font color="#3f7f5f">&lt;/param-name&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;param-value&gt;</font>UTF-8<font color="#3f7f5f">&lt;/param-value&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;/init-param&gt;</font><br/>
<font color="#3f7f5f">&lt;/filter&gt;</font><br/>
<font color="#3f7f5f">&lt;filter-mapping&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;filter-name&gt;</font>encoding<font color="#3f7f5f">&lt;/filter-name&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;url-pattern&gt;</font>*.action<font color="#3f7f5f">&lt;/url-pattern&gt;</font><br/>
<font color="#3f7f5f">&lt;/filter-mapping&gt;</font><br/>
<br/>
<font color="#3f7f5f">&lt;servlet&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;servlet-name&gt;</font>webwork<font color="#3f7f5f">&lt;/servlet-name&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;servlet-class&gt;</font>com.opensymphony.webwork.dispatcher.ServletDispatcher<font color="#3f7f5f">&lt;/servlet-class&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;load-on-startup&gt;</font>1<font color="#3f7f5f">&lt;/load-on-startup&gt;</font><br/>
<font color="#3f7f5f">&lt;/servlet&gt;</font><br/>
<font color="#3f7f5f">&lt;servlet-mapping&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;servlet-name&gt;</font>webwork<font color="#3f7f5f">&lt;/servlet-name&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;url-pattern&gt;</font>*.action<font color="#3f7f5f">&lt;/url-pattern&gt;</font><br/>
<font color="#3f7f5f">&lt;/servlet-mapping&gt;</font><br/>
								<br/>
								xwork.xml:<br/>
<font color="#3f7f5f">&lt;?xml&nbsp;<font color="#7f0055">version</font><font color="#000000">=</font><font color="#2a00ff">"1.0"</font>&nbsp;<font color="#7f0055">encoding</font><font color="#000000">=</font><font color="#2a00ff">"UTF-8"</font>?&gt;</font><br/>
<font color="#3f7f5f">&lt;!DOCTYPE&nbsp;xwork&nbsp;<font color="#666666">PUBLIC</font>&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#2a00ff">"-//OpenSymphony&nbsp;Group//XWork&nbsp;1.1.1//EN"</font>&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#2a00ff">"http://www.opensymphony.com/xwork/xwork-1.1.1.dtd"</font>&gt;</font><br/>
<font color="#3f7f5f">&lt;xwork&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;include&nbsp;<font color="#7f0055">file</font><font color="#000000">=</font><font color="#2a00ff">"webwork-default.xml"</font>&nbsp;/&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;package&nbsp;<font color="#7f0055">name</font><font color="#000000">=</font><font color="#2a00ff">"test"</font>&nbsp;<font color="#7f0055">extends</font><font color="#000000">=</font><font color="#2a00ff">"webwork-default"</font>&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;result-types&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;result-type&nbsp;<font color="#7f0055">default</font><font color="#000000">=</font><font color="#2a00ff">"true"</font>&nbsp;<font color="#7f0055">name</font><font color="#000000">=</font><font color="#2a00ff">"commontemplate"</font>&nbsp;<font color="#7f0055">class</font><font color="#000000">=</font><font color="#2a00ff">"org.commontemplate.tools.web.webwork.TemplateResult"</font>&nbsp;/&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;/result-types&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;action&nbsp;<font color="#7f0055">name</font><font color="#000000">=</font><font color="#2a00ff">"index"</font>&nbsp;<font color="#7f0055">class</font><font color="#000000">=</font><font color="#2a00ff">"com.xxx.IndexAction"</font>&nbsp;<font color="#7f0055">method</font><font color="#000000">=</font><font color="#2a00ff">"index"</font>&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;result&nbsp;<font color="#7f0055">name</font><font color="#000000">=</font><font color="#2a00ff">"success"</font>&nbsp;<font color="#7f0055">type</font><font color="#000000">=</font><font color="#2a00ff">"commontemplate"</font>&gt;</font>/index.ctl<font color="#3f7f5f">&lt;/result&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;/action&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;/package&gt;</font><br/>
<font color="#3f7f5f">&lt;/xwork&gt;</font><br/>
								<br/>
								<b>(4) Struts2</b><br/>
								web.xml:<br/>
<font color="#3f7f5f">&lt;listener&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;listener-class&gt;</font>org.commontemplate.tools.web.EngineInitializeListener<font color="#3f7f5f">&lt;/listener-class&gt;</font><br/>
<font color="#3f7f5f">&lt;/listener&gt;</font><br/>
<br/>
<font color="#3f7f5f">&lt;filter&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;filter-name&gt;</font>encoding<font color="#3f7f5f">&lt;/filter-name&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;filter-class&gt;</font>org.commontemplate.tools.web.EncodingFilter<font color="#3f7f5f">&lt;/filter-class&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;init-param&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;param-name&gt;</font>encoding<font color="#3f7f5f">&lt;/param-name&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;param-value&gt;</font>UTF-8<font color="#3f7f5f">&lt;/param-value&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;/init-param&gt;</font><br/>
<font color="#3f7f5f">&lt;/filter&gt;</font><br/>
<font color="#3f7f5f">&lt;filter-mapping&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;filter-name&gt;</font>encoding<font color="#3f7f5f">&lt;/filter-name&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;url-pattern&gt;</font>*.action<font color="#3f7f5f">&lt;/url-pattern&gt;</font><br/>
<font color="#3f7f5f">&lt;/filter-mapping&gt;</font><br/>
<br/>
<font color="#3f7f5f">&lt;filter&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;filter-name&gt;</font>struts2<font color="#3f7f5f">&lt;/filter-name&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;filter-class&gt;</font>org.apache.struts2.dispatcher.FilterDispatcher<font color="#3f7f5f">&lt;/filter-class&gt;</font><br/>
<font color="#3f7f5f">&lt;/filter&gt;</font><br/>
<font color="#3f7f5f">&lt;filter-mapping&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;filter-name&gt;</font>struts2<font color="#3f7f5f">&lt;/filter-name&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;url-pattern&gt;</font>/*<font color="#3f7f5f">&lt;/url-pattern&gt;</font><br/>
<font color="#3f7f5f">&lt;/filter-mapping&gt;</font><br/>
								<br/>
								struts.xml:<br/>
<font color="#3f7f5f">&lt;?xml&nbsp;<font color="#7f0055">version</font><font color="#000000">=</font><font color="#2a00ff">"1.0"</font>&nbsp;<font color="#7f0055">encoding</font><font color="#000000">=</font><font color="#2a00ff">"UTF-8"</font>&nbsp;?&gt;</font>&nbsp;<br/>
<font color="#3f7f5f">&lt;!DOCTYPE&nbsp;struts&nbsp;<font color="#666666">PUBLIC</font>&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#2a00ff">"-//Apache&nbsp;Software&nbsp;Foundation//DTD&nbsp;Struts&nbsp;Configuration&nbsp;2.0//EN"</font>&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#2a00ff">"http://struts.apache.org/dtds/struts-2.0.dtd"</font>&gt;</font><br/>
<font color="#3f7f5f">&lt;struts&gt;</font>&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;include&nbsp;<font color="#7f0055">file</font><font color="#000000">=</font><font color="#2a00ff">"struts-default.xml"</font>&nbsp;/&gt;</font>&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;package&nbsp;<font color="#7f0055">name</font><font color="#000000">=</font><font color="#2a00ff">"test"</font>&nbsp;<font color="#7f0055">extends</font><font color="#000000">=</font><font color="#2a00ff">"struts-default"</font>&gt;</font>&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;result-types&gt;</font>&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;result-type&nbsp;<font color="#7f0055">default</font><font color="#000000">=</font><font color="#2a00ff">"true"</font>&nbsp;<font color="#7f0055">name</font><font color="#000000">=</font><font color="#2a00ff">"commontemplate"</font>&nbsp;<font color="#7f0055">class</font><font color="#000000">=</font><font color="#2a00ff">"org.commontemplate.tools.web.struts2.TemplateResult"</font>&nbsp;/&gt;</font>&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;/result-types&gt;</font>&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;action&nbsp;<font color="#7f0055">name</font><font color="#000000">=</font><font color="#2a00ff">"index"</font>&nbsp;<font color="#7f0055">class</font><font color="#000000">=</font><font color="#2a00ff">"com.xxx.IndexAction"</font>&nbsp;<font color="#7f0055">method</font><font color="#000000">=</font><font color="#2a00ff">"index"</font>&gt;</font>&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;result&nbsp;<font color="#7f0055">name</font><font color="#000000">=</font><font color="#2a00ff">"success"</font>&nbsp;<font color="#7f0055">type</font><font color="#000000">=</font><font color="#2a00ff">"commontemplate"</font>&gt;</font>/index.ctl<font color="#3f7f5f">&lt;/result&gt;</font>&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;/action&gt;</font>&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;/package&gt;</font>&nbsp;<br/>
<font color="#3f7f5f">&lt;/struts&gt;</font>&nbsp;<br/>
								<br/>
								<b>(5) Spring/SpringMVC</b><br/>
								...<br/>
								<br/>
								<b>(6) JSP</b><br/>
								commontemplate.tld:<br/>
<font color="#3f7f5f">&lt;?xml&nbsp;<font color="#7f0055">version</font><font color="#000000">=</font><font color="#2a00ff">"1.0"</font>&nbsp;<font color="#7f0055">encoding</font><font color="#000000">=</font><font color="#2a00ff">"UTF-8"</font>&nbsp;?&gt;</font><br/>
<font color="#3f7f5f">&lt;!DOCTYPE&nbsp;taglib&nbsp;<font color="#666666">PUBLIC</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#2a00ff">"-//Sun&nbsp;Microsystems,&nbsp;Inc.//DTD&nbsp;JSP&nbsp;Tag&nbsp;Library&nbsp;1.2//EN"</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#2a00ff">"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"</font>&gt;</font><br/>
<font color="#3f7f5f">&lt;taglib&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;tlib-version&gt;</font>1.0<font color="#3f7f5f">&lt;/tlib-version&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;jsp-version&gt;</font>1.2<font color="#3f7f5f">&lt;/jsp-version&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;short-name&gt;</font>ct<font color="#3f7f5f">&lt;/short-name&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;uri&gt;</font>http://www.commontemplate.org/taglib/template<font color="#3f7f5f">&lt;/uri&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;display-name&gt;</font>Common&nbsp;Template<font color="#3f7f5f">&lt;/display-name&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;description&gt;</font>Common&nbsp;Template&nbsp;Library<font color="#3f7f5f">&lt;/description&gt;</font><br/>
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;tag&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;name&gt;</font>template<font color="#3f7f5f">&lt;/name&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;tag-class&gt;</font>org.commontemplate.tools.web.jsp.TemplateTag<font color="#3f7f5f">&lt;/tag-class&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;body-content&gt;</font>JSP<font color="#3f7f5f">&lt;/body-content&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;description&gt;</font>Common&nbsp;Template&nbsp;In&nbsp;JSP<font color="#3f7f5f">&lt;/description&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;/tag&gt;</font><br/>
<font color="#3f7f5f">&lt;/taglib&gt;</font><br/>
								<br/>
								test.jsp:<br/>
<font color="#3f7f5f">&lt;%@taglib&nbsp;<font color="#7f0055">uri</font><font color="#000000">=</font><font color="#2a00ff">"http://www.commontemplate.org/taglib/template"</font>&nbsp;<font color="#7f0055">prefix</font><font color="#000000">=</font><font color="#2a00ff">"ct"</font>&nbsp;%&gt;</font><br/>
<font color="#3f7f5f">&lt;ct:template&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;JSP&nbsp;or/and&nbsp;CTL...<br/>
<font color="#3f7f5f">&lt;/ct:template&gt;</font><br/>
								<br/>
								<br/>
								<b>2. Config</b> <a href="dependency.html">Dependency&gt;&gt;</a><br/>
								<b>(1) CommonsLogger/Log4J</b><br/>
								commontemplate-my.properties:<br/>
								@extends=<font color="#2a00ff">org/commontemplate/tools/web/commontemplate.properties</font><br/>
								loggerProvider=<font color="#2a00ff">org.commontemplate.util.log.CommonsLoggerProvider()</font><br/>
								<br/>
								commons-logging.properties:<br/>
								logger=<font color="#2a00ff">org.apache.commons.logging.impl.Log4JLogger</font><br/>
								<br/>
								log4j.properties:<br/>
								log4j.rootLogger=<font color="#2a00ff">DEBUG,stdout</font><br/>
								log4j.appender.stdout=<font color="#2a00ff">org.apache.log4j.ConsoleAppender</font><br/>
								log4j.appender.stdout.layout=<font color="#2a00ff">org.apache.log4j.PatternLayout</font><br/>
								log4j.appender.stdout.layout.ConversionPattern=<font color="#2a00ff">%-5p [%d] %C - %m\n</font><br/>
								log4j.logger.CommonTemplate=<font color="#2a00ff">DEBUG</font><br/>
								<br/>
								<b>(2) OSCache</b><br/>
								commontemplate-my.properties:<br/>
								@extends=<font color="#2a00ff">org/commontemplate/tools/web/commontemplate.properties</font><br/>
								templateCache=<font color="#2a00ff">org.commontemplate.standard.cache.OSCache()</font><br/>
								<br/>
								oscache.properties:<br/>
								cache.algorithm=<font color="#2a00ff">com.opensymphony.oscache.base.algorithm.LRUCache</font><br/>
								cache.capacity=<font color="#2a00ff">1000</font><br/>
								<br/>
								<b>(3) EHCache</b><br/>
								commontemplate-my.properties:<br/>
								@extends=<font color="#2a00ff">org/commontemplate/tools/web/commontemplate.properties</font><br/>
								templateCache=<font color="#2a00ff">org.commontemplate.standard.cache.EHCache()</font><br/>
								<br/>
								ehcache.xml:<br/>
								<font color="#3f7f5f">&lt;ehcache&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;diskStore&nbsp;<font color="#7f0055">path</font><font color="#000000">=</font><font color="#2a00ff">"java.io.tmpdir"</font>&nbsp;/&gt;</font><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#3f7f5f">&lt;defaultCache&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#7f0055">maxElementsInMemory</font><font color="#000000">=</font><font color="#2a00ff">"10000"</font>&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#7f0055">eternal</font><font color="#000000">=</font><font color="#2a00ff">"false"</font>&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#7f0055">timeToIdleSeconds</font><font color="#000000">=</font><font color="#2a00ff">"120"</font>&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#7f0055">timeToLiveSeconds</font><font color="#000000">=</font><font color="#2a00ff">"120"</font>&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#7f0055">overflowToDisk</font><font color="#000000">=</font><font color="#2a00ff">"true"</font>&nbsp;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;/&gt;</font><br/>
<font color="#3f7f5f">&lt;/ehcache&gt;</font><br/>
								<br/>
								<b>(4) TagLib</b><br/>
								commontemplate-my.properties:<br/>
								directive{textarea}=<font color="#2a00ff">org.commontemplate.standard.web.taglib.JspTagDirectiveAdapter()</font><br/>
								directive{textarea}.tld=<font color="#2a00ff">textarea.tld</font><br/>

	
										</td>
									<tr>
								</table>
							</td>
							<td width="20">&nbsp;</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td height="6" align="center"><hr width="94%" align="center"/></td>
			</tr>
			<tr>
				<td height="24" align="center">
					<table border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td>
								Copyright &#169; 2007 - 2009 <a href="about.html">CommonTemplate Developer Team</a>
							</td>
							<td width="100" align="right">
								<a href="http://www.commontemplate.org"><img src="../images/logo.gif" border="0" /></a>
							</td>
							<td width="100" align="right">
								<a href="http://www.commontemplate.org"><img src="../images/powered.gif" border="0" /></a>
							</td>
						<tr>
					</table>
				</td>
			</tr>
		</table>
	</body>
</html>